package leetcode.Fiftyone_to_One_hundred;

public class Test69 {

    public static int mySqrt(int x) {
//        return (int) Math.sqrt(x);
        int result = 0;
        for (int i = 1; i <= x / i; i++) {
            if (i * i == x)
                return i;
            result = i;
        }
        return result;
    }

    public static void main(String[] args) {
        System.out.println(mySqrt(64));
    }
}
